<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/base64.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/buttons.min.css">

    <title>Covariant Script Online Interpreter</title>
    <link rel="icon" href="./favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="index.css">
    <script type="text/javascript" src="index.js"></script>
</head>

<body>
    <div id="main">
        <div id="left">
            <p>Covariant Script 代码</p>
            <textarea class="textbox" spellcheck="false" name="code" id="code" rows="20" autofocus="true"></textarea>
        </div>
        <div id="right">
            <p>程序输入 & 输出</p>
            <textarea class="textbox" spellcheck="false" name="stdin" id="stdin" rows="9"
                style="margin-bottom:33px;"></textarea>
            <textarea class="textbox" spellcheck="false" name="result" id="result" rows="9" readonly="true"></textarea>
        </div>
    </div>
    <div id="main" style="margin-bottom: 20px;">
        <div id="left">
            <button class="button" style="background:hsl(212, 61%, 50%);" type="submit" onclick="onRun()">运行</button>
            <button class="button" style="background:limegreen;" type="clear" onclick="genWxaCode()">打开小程序</button>
        </div>
        <div id="right">
            <button class="button" style="background:#ffd000;" type="clear" onclick="onReset()">重置</button>
            <a href="https://csman.info/" target="_blank">
                <button class="button" type="clear">查阅文档</button>
            </a>
        </div>
    </div>
    <div id="myModal" class="modal">
        <span class="close" onclick="document.getElementById('myModal').style.display='none'">&times;</span>
        <img class="modal-content" src="" id="wxacode">
        <div id="caption"></div>
    </div>
    <div style="font-size: small;">
        <p>CovScript 在线解释环境</p>
        <p>版权所有 © Michael Lee(李登淳) 2017-2021</p>
        <div id="covscript_ver"></div>
        <script type="text/javascript">
            document.write("<p>UserAgent: ")
            document.write(navigator.userAgent + "</p>")
        </script>
    </div>
</body>

<script>
    onReset()
</script>

</html>